package com.lv.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfig;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

@Configuration
public class ItenPageConfig {

    //实例化FreeMarkerConfigurer
    @Bean
    public FreeMarkerConfigurer freeMarkerConfig(){
        FreeMarkerConfigurer config = new FreeMarkerConfigurer();
        // 设置编码格式
        config.setDefaultEncoding("UTF-8");
        //模板加载路径
        config.setTemplateLoaderPath("classpath:freemarker");
        return  config;
    }
}
